import { defineConfig } from 'umi'
import routes from './routes'
import defaultConfig from './defaultConfig'

export default defineConfig({
    antd: { dark: true, compact: true },
    base: '/', // 主path
    publicPath: './',
    copy: [], // 编译直接拷贝
    dva: { hmr: true, immer: true },
    define: {}, // 内置变量
    dynamicImport: {},
    esbuild: {},
    favicon: './favicon.ico',
    hash: true,
    headScripts: [], // 配置 <head> 里的额外脚本
    history: { type: 'hash' },
    ignoreMomentLocale: true,
    layout: { name: defaultConfig.title, logo: './favicon.ico' },
    links: [], // 配置额外的 link 标签
    locale: { default: 'zh-CN', antd: true },
    nodeModulesTransform: { type: 'none' },
    scripts: [], // 配置 <body> 里的额外脚本
    targets: { ie: 11 },
    theme: { 'primary-color': defaultConfig.primaryColor }, // less变量
    metas: [
        { name: 'author', content: '贝图办公@oak' },
        { name: 'description', content: '贝图内部管理平台' },
    ],
    routes,
})
